/* Task Status Cycle management UI */
.task-states-container {
	margin: 10px 0;
	border: 1px solid var(--background-modifier-border);
	border-radius: 5px;
	padding: 10px;
}

.task-state-row {
	margin-bottom: 8px;
}

.task-state-row .setting-item {
	border: none;
	padding: 6px;
	border-radius: 4px;
}

.task-state-row .setting-item-info {
	margin-right: 10px;
}

.task-state-row .setting-item-control {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
}

.task-state-row .setting-item-control input[type="text"] {
	margin-right: 8px;
}

.task-state-row .extra-setting-button {
	padding: 4px;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	margin-left: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.task-state-row .setting-item-control button {
	white-space: nowrap;
}

.task-state-container {
	margin-inline-start: calc(var(--checkbox-size) * -1);
}

.task-state-container .task-state {
	padding-inline-start: var(--size-2-1);
	padding-inline-end: var(--size-2-2);

	text-decoration: none !important;

	cursor: pointer;
}

/* Task Status Cycle management UI */
.task-states-container {
	margin: 10px 0;
	border: 1px solid var(--background-modifier-border);
	border-radius: 5px;
	padding: 10px;
}

.task-state-row {
	margin-bottom: 8px;
}

.task-state-row .setting-item {
	border: none;
	padding: 6px;
	border-radius: 4px;
}

.task-state-row .setting-item-info {
	margin-right: 10px;
}

.task-state-row .setting-item-control {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
}

.task-state-row .setting-item-control input[type="text"] {
	margin-right: 8px;
}

.task-state-row .extra-setting-button {
	padding: 4px;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	margin-left: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.task-state-row .setting-item-control button {
	white-space: nowrap;
}

.task-state-container {
	margin-inline-start: calc(var(--checkbox-size) * -1);
}

.task-state-container .task-state {
	padding-inline-start: var(--size-2-1);
	padding-inline-end: var(--size-2-2);

	text-decoration: none !important;

	cursor: pointer;
}

/* Categorized tabs container */
.task-genius-settings .settings-tabs-categorized-container {
	margin-top: var(--size-4-4);
	margin-bottom: var(--size-4-4);
	display: flex;
	flex-direction: column;
	gap: var(--size-4-6);
}

/* Category section */
.task-genius-settings .settings-category-section {
	display: flex;
	flex-direction: column;
	gap: var(--size-4-2);
}

/* Category header */
.task-genius-settings .settings-category-header {
	font-size: var(--font-ui-small);
	font-weight: var(--font-weight-semibold);
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0 var(--size-4-2);
	border-bottom: 1px solid var(--background-modifier-border);
	padding-bottom: var(--size-4-1);
}

/* Category tabs container */
.task-genius-settings .settings-category-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(200px, 1fr));
	gap: var(--size-4-2);
}

@media (max-width: 1200px) {
	.task-genius-settings .settings-category-tabs {
		grid-template-columns: repeat(2, minmax(200px, 1fr));
	}
}

@media (max-width: 768px) {
	.task-genius-settings .settings-category-tabs {
		grid-template-columns: 1fr;
	}
}

/* Legacy tabs container (fallback) */
.task-genius-settings .settings-tabs-container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	grid-auto-rows: var(--size-4-18);
	margin-top: var(--size-4-4);
	margin-bottom: var(--size-4-4);
	height: fit-content;
	gap: var(--size-4-4);
}

@media (max-width: 768px) {
	.task-genius-settings .settings-tabs-container {
		grid-template-columns: repeat(1, 1fr);
	}
}

.task-genius-settings .settings-tab {
	padding: var(--size-4-3) var(--size-4-4);
	border-radius: var(--radius-m);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: var(--size-4-2);
	min-height: var(--size-4-12);
	border: 1px solid var(--background-modifier-border);
	background: var(--background-primary);
	position: relative;
	overflow: hidden;
	transition: all 0.2s ease;
}

.task-genius-settings .settings-tab::after {
	content: "";
	position: absolute;
	top: 10px;
	right: -80px;
	width: 200px;
	height: 200px;
	background-color: var(--background-secondary-alt);
	transform: rotateZ(-15deg);
	z-index: 0;
	opacity: 0.7;
	transition: all 0.3s ease;
	border-radius: var(--radius-m);
}

.task-genius-settings .settings-tab:hover::after {
	transform: rotateZ(-10deg);
	opacity: 0.9;
}

.task-genius-settings .settings-tab-active::after {
	background-color: var(--interactive-accent);
	opacity: 0.3;
}

/* Tab content styling */
.task-genius-settings .settings-tab-icon,
.task-genius-settings .settings-tab span,
.task-genius-settings .settings-tab-label {
	position: relative;
	z-index: 1;
}

/* Enhanced tab icon styling for categorized layout */
.task-genius-settings .settings-category-tabs .settings-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--size-4-4);
	height: var(--size-4-4);
	flex-shrink: 0;
}

.task-genius-settings .settings-category-tabs .settings-tab-icon svg {
	width: var(--icon-s);
	height: var(--icon-s);
}

/* Enhanced tab label styling for categorized layout */
.task-genius-settings .settings-category-tabs .settings-tab-label {
	font-size: var(--font-ui-small);
	font-weight: var(--font-weight-medium);
	flex: 1;
	text-align: left;
}

/* Enhanced hover and active states for categorized tabs */
.task-genius-settings .settings-category-tabs .settings-tab:hover {
	background: var(--background-modifier-hover);
	border-color: var(--background-modifier-border-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-m);
}

.task-genius-settings .settings-category-tabs .settings-tab-active {
	background: var(--interactive-accent);
	color: var(--text-on-accent);
	border-color: var(--interactive-accent);
	box-shadow: var(--shadow-m);
	font-weight: var(--font-weight-semibold);
}

.task-genius-settings .settings-category-tabs .settings-tab-active:hover {
	background: var(--interactive-accent-hover);
	border-color: var(--interactive-accent-hover);
	transform: translateY(-1px);
}

/* Legacy tab styles (fallback) */
.task-genius-settings .settings-tab:hover {
	background-color: var(--background-modifier-hover);
}

.task-genius-settings .settings-tab-active {
	background-color: var(--background-modifier-border-hover);
	font-weight: bold;
}

.task-genius-settings .settings-tab-sections {
	overflow: hidden;
}

.task-genius-settings .settings-tab-section {
	display: none;
}

.task-genius-settings .settings-tab-section-active {
	display: block;
}

.task-genius-settings .settings-tab-section-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: var(--size-4-2);
	margin-bottom: var(--size-4-2);
}

.task-genius-settings .settings-tab-section-header .header-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-size: var(--font-ui-small);
}

.task-genius-settings .settings-tab-section-header .header-button-icon {
	--icon-size: 16px;

	display: flex;
	align-items: center;
	justify-content: center;
}

/* Tab section header visibility rules */
.task-genius-settings .settings-tab[data-tab-id="general"] {
	display: none;
}

/* Hide categorized tabs container when any non-general tab is active */
.task-genius-settings .settings-tabs-categorized-container {
	display: flex;
}

.task-genius-settings:has(
		.settings-tab-section-active:not([data-tab-id="general"])
	)
	.settings-tabs-categorized-container {
	display: none;
}

/* Legacy tabs container visibility (fallback) */
.task-genius-settings .settings-tabs-container {
	display: none;
}

/* Show legacy tabs when general tab is active (fallback behavior) */
.task-genius-settings:has(.settings-tab-active[data-tab-id="general"])
	.settings-tabs-container {
	display: grid;
}

/* Settings header visibility - hide when non-general tab is active */
.task-genius-settings-header {
	display: block;
}

.task-genius-settings:has(
		.settings-tab-section-active:not([data-tab-id="general"])
	)
	.task-genius-settings-header {
	display: none;
}

/* Expression examples in settings */
.expression-examples {
	margin-top: 8px;
	border-radius: 5px;
}

.expression-example-item {
	margin-bottom: var(--size-4-3);
	padding: var(--size-4-2);
	padding-left: var(--size-4-3);
	padding-right: var(--size-4-3);
	border-radius: var(--radius-s);
	/* background-color: var(--background-primary); */
	display: flex;
	flex-direction: column;
	gap: 6px;
	border: 1px solid var(--background-modifier-border);
}

.expression-example-name {
	font-weight: bold;
}

.expression-example-code {
	padding: 4px 8px;
	background-color: var(--background-secondary);
	border-radius: 4px;
	font-family: var(--font-monospace);
	font-size: 0.9em;
	overflow-wrap: break-word;
	user-select: text;
}

.expression-example-use {
	align-self: flex-end;
	margin-top: 4px;
}

.custom-format-textarea {
	height: 200px;
	width: 100%;
	font-family: var(--font-monospace);
	resize: vertical;
}

.custom-format-preview-container {
	margin-bottom: var(--size-4-3);
	padding: var(--size-4-3);
	border-radius: var(--radius-s);
	background-color: var(--background-secondary);
	display: flex;
	flex-direction: column;
}

.custom-format-preview-label {
	font-weight: bold;
	margin-bottom: var(--size-4-2);
	color: var(--text-muted);
}

.custom-format-preview-content {
	padding: var(--size-4-2);
	background-color: var(--background-primary);
	border-radius: var(--radius-s);
	font-family: var(--font-interface);
}

.custom-format-placeholder-info {
	margin-top: var(--size-4-2);
	margin-bottom: var(--size-4-2);

	user-select: text;
}

.custom-format-preview-error,
.expression-preview-error {
	color: var(--text-error);
}

/* 表达式示例预览样式 */
.expression-example-preview {
	margin-top: var(--size-4-2);
	padding: var(--size-4-2);
	background-color: var(--background-primary-alt);
	border-radius: var(--radius-s);
	font-size: 0.9em;
}

.preset-filters-container {
	margin-top: 10px;
	padding: 8px;
	border-radius: 5px;
	border: 1px solid var(--background-modifier-border);
}

.preset-filter-row {
	margin-bottom: 5px;
	border-radius: 4px;
	padding-top: var(--size-4-2);
	padding-left: var(--size-4-2);
	padding-right: var(--size-4-2);
	transition: background-color 0.2s ease;
}

.preset-filter-row:hover {
	background-color: var(--background-secondary-alt);
}

.no-presets-message {
	font-style: italic;
	color: var(--text-muted);
	text-align: center;
	padding: 15px;
}

.preset-saved-message {
	color: var(--text-accent);
	font-weight: bold;
	text-align: center;
	padding: 5px;
	margin-top: 5px;
	animation: fadeIn 0.3s ease-in-out;
}

.task-filter-save-preset {
	margin-top: 15px;
	padding: 10px;
	border-radius: 5px;
	background-color: var(--background-secondary-alt);
}

.tg-modal-button-container {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}

.tg-modal-button-container button {
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.tg-modal-button-container button.mod-warning {
	background-color: var(--background-modifier-error);
	color: white;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.modal-workflow-definition {
	max-width: 800px;
	width: 90vw;
}

.modal-stage-definition {
	max-width: 800px;
	width: 90vw;
}

/* Workflow settings panel improvements */
.workflow-container {
	border: 1px solid var(--background-modifier-border);
	border-radius: 5px;
	padding: 15px;
	max-height: 500px;
	overflow-y: auto;
	background-color: var(--background-primary);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.workflow-row {
	margin-bottom: 15px;
	padding: 12px;
	border-radius: 6px;
	background-color: var(--background-secondary-alt);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	border-left: 3px solid var(--interactive-accent);
}

.workflow-row .setting-item {
	border: none;
	padding: 0;
}

.workflow-row .setting-item-info {
	padding: 0 !important;
}

.workflow-row .setting-item-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-normal);
}

.workflow-row .setting-item-description {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 4px;
}

.workflow-stages-info {
	margin-top: 12px;
	padding: 8px 0 0 0;
	border-top: 1px solid var(--background-modifier-border);
}

.workflow-stages-list {
	list-style-type: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--size-2-2);
	padding: 0;
	margin: 0;
}

.workflow-stage-item {
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	background-color: var(--background-modifier-border);
}

.workflow-stage-cycle {
	background-color: var(--task-in-progress-color);
	color: var(--text-on-accent);
}

.workflow-stage-terminal {
	background-color: var(--task-completed-color);
	color: var(--text-on-accent);
}

.no-workflows-message {
	font-style: italic;
	color: var(--text-muted);
	text-align: center;
	padding: 15px;
}

/* Workflow modal styles */
.workflow-form {
	margin-bottom: 20px;
}

.workflow-stages-section {
	margin-top: 20px;
	border-top: 1px solid var(--background-modifier-border);
	padding-top: 15px;
}

.workflow-stages-section h2 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 1.3em;
	color: var(--text-normal);
}

.workflow-stages-container {
	margin-top: 15px;
}

.workflow-stages-container .workflow-stages-list {
	display: block;
	flex-wrap: unset;
	gap: unset;
}

.workflow-stages-container .workflow-stage-item {
	display: block;
	margin-bottom: 10px;
	padding: 0;
	background-color: transparent;
}

.workflow-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
	padding-top: 10px;
	border-top: 1px solid var(--background-modifier-border);
}

.workflow-save-button,
.workflow-cancel-button,
.workflow-add-stage-button {
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
}

.workflow-save-button.mod-cta {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.workflow-cancel-button {
	background-color: var(--background-modifier-border);
	color: var(--text-normal);
}

.workflow-add-stage-button {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
	margin-top: 10px;
}

.no-stages-message {
	font-style: italic;
	color: var(--text-muted);
	text-align: center;
	padding: 15px;
}

/* Stage editing styles */
.workflow-stage-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background-color: var(--background-secondary);
	border-radius: 4px;
	margin-bottom: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.workflow-stage-name {
	font-weight: 600;
	flex: 1;
	margin-right: 10px;
}

.workflow-stage-actions {
	display: flex;
	gap: 5px;
}

.workflow-stage-edit,
.workflow-stage-move-up,
.workflow-stage-move-down,
.workflow-stage-delete {
	padding: 3px 8px;
	border-radius: 3px;
	background-color: var(--background-modifier-border);
	cursor: pointer;
	font-size: 12px;
	border: none;
}

.workflow-stage-edit:hover,
.workflow-stage-move-up:hover,
.workflow-stage-move-down:hover {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.workflow-stage-delete:hover {
	background-color: var(--background-modifier-error);
	color: var(--text-on-accent);
}

.workflow-stage-type-badge {
	display: inline-block;
	padding: 2px 6px;
	margin-left: 8px;
	border-radius: 3px;
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 600;
}

.workflow-stage-type-linear {
	background-color: var(--background-modifier-border);
}

.workflow-stage-type-cycle {
	background-color: var(--task-in-progress-color);
	color: var(--text-on-accent);
}

.workflow-stage-type-terminal {
	background-color: var(--task-completed-color);
	color: var(--text-on-accent);
}

/* Substage styles */
.workflow-substages-list {
	padding: 0 0 0 var(--size-4-6);
	margin-top: var(--size-4-2);
	margin-bottom: var(--size-4-2);
	border-left: 2px solid var(--background-modifier-border);
}

.substage-settings-container {
	width: 100%;
}

/* Stage edit modal */
.stage-type-settings {
	margin-top: 20px;
	border: 1px solid var(--background-modifier-border);
	border-radius: 4px;
	padding: 15px;
	background-color: var(--background-primary);
}

.substages-section,
.can-proceed-to-section {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid var(--background-modifier-border);
}

.substages-container,
.can-proceed-to-container {
	margin-top: 15px;
	padding: 10px;
	border-radius: 4px;
}

.substages-list,
.can-proceed-list {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.substage-name-container {
	display: flex;
	gap: 10px;
	align-items: center;
	flex: 1;
}

.substage-name-container input {
	padding: 4px 8px;
	border-radius: 3px;
	border: 1px solid var(--background-modifier-border);
	background-color: var(--background-primary);
}

.substage-next-container {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-left: 10px;
}

.substage-remove-button,
.can-proceed-remove-button {
	color: var(--text-normal);
	border-radius: 3px;
	padding: 2px 5px;
	cursor: pointer;
	border: none;
}

.substage-remove-button:hover,
.can-proceed-remove-button:hover {
	background-color: var(--background-modifier-error);
	color: var(--text-on-accent);
}

.add-substage-button,
.add-can-proceed-button {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
	padding: 4px 10px;
	border-radius: 4px;
	margin-top: 10px;
	cursor: pointer;
	border: none;
}

.add-can-proceed-container {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.add-can-proceed-select {
	flex: 1;
	padding: 4px 8px;
	border-radius: 3px;
	border: 1px solid var(--background-modifier-border);
}

.stage-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
	padding-top: 10px;
	border-top: 1px solid var(--background-modifier-border);
}

.stage-save-button,
.stage-cancel-button {
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
	border: none;
}

.stage-save-button.mod-cta {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.stage-cancel-button {
	background-color: var(--background-modifier-border);
	color: var(--text-normal);
}

.stage-error-message {
	color: var(--background-modifier-error);
	font-weight: bold;
	text-align: center;
	margin-top: 10px;
	padding: 8px;
	border-radius: 4px;
}

/* Workflow task in editor/preview mode styles */
.task-workflow-tag {
	display: inline-block;
	padding: 2px 5px;
	border-radius: 3px;
	margin-left: 5px;
	font-size: 12px;
	background-color: var(--background-secondary-alt);
}

.task-workflow-stage {
	margin-left: 5px;
	color: var(--text-accent);
}

.task-workflow-substage {
	font-size: 11px;
	color: var(--text-muted);
}

.task-workflow-history {
	margin-left: 20px;
	font-size: 12px;
	color: var(--text-muted);
}

.task-workflow-timestamp {
	color: var(--text-faint);
}

/* Workflow settings display enhancements */
.setting-item-control span[class^="workflow-stage-name-"] {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
	margin-right: 5px;
}

.setting-item-control .workflow-stage-name-cycle {
	background-color: var(--task-in-progress-color);
	color: var(--text-on-accent);
}

.setting-item-control .workflow-stage-name-terminal {
	background-color: var(--task-completed-color);
	color: var(--text-on-accent);
}

.workflow-stage-item {
	margin-right: 4px;
}

/* WorkflowDefinitionModal header enhancements */
.workflow-stages-container .workflow-stage-header {
	padding: 8px 12px;
	background-color: var(--background-secondary);
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	margin-bottom: 8px;
}

.workflow-stages-container .workflow-stage-type-badge {
	display: inline-block;
	padding: 2px 6px;
	margin-left: 8px;
	border-radius: 3px;
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 600;
}

.workflow-substages-list {
	list-style-type: none;
	padding: 0 0 0 20px;
	margin: 5px 0 10px 0;
	border-left: 2px solid var(--background-modifier-border);
}

/* Better buttons in workflow panels */
.workflow-add-stage-button,
.stage-save-button.mod-cta,
.workflow-save-button.mod-cta {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
	padding: 6px 15px;
	border-radius: 4px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
	text-align: center;
}

.workflow-add-stage-button:hover,
.stage-save-button.mod-cta:hover,
.workflow-save-button.mod-cta:hover {
	background-color: var(--interactive-accent-hover);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

.workflow-stage-move-up,
.workflow-stage-move-down,
.workflow-stage-edit,
.workflow-stage-delete {
	border: none;
	background-color: var(--background-modifier-border);
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.workflow-stage-move-up:hover,
.workflow-stage-move-down:hover,
.workflow-stage-edit:hover {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.workflow-stage-delete:hover {
	background-color: var(--background-modifier-error);
	color: var(--text-on-accent);
}

/* Subtask styling improvements */
.substage-item {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 6px 0;
	margin-bottom: 5px;
	border-radius: 4px;
}

.substage-name-container input {
	background-color: var(--background-primary);
	border: 1px solid var(--background-modifier-border);
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 13px;
}

.substage-name-container input:focus {
	border-color: var(--interactive-accent);
	outline: none;
}

.no-stages-message,
.no-workflows-message,
.no-substages-message,
.no-can-proceed-message {
	font-style: italic;
	color: var(--text-muted);
	padding: 15px;
	text-align: center;
	background-color: var(--background-secondary-alt);
	border-radius: 5px;
	margin: 10px 0;
}

/* START: Reward Settings Styles */
.rewards-levels-container,
.rewards-items-container {
	margin-top: 10px;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid var(--background-modifier-border);
	background-color: var(--background-secondary);
}

.rewards-level-row .setting-item-info,
.rewards-item-row .setting-item-info {
	display: none;
}

.rewards-item-row.setting-item {
	border-top: 0;
}

.rewards-level-row .setting-item-control,
.rewards-item-row .setting-item-control {
	display: flex;
	flex-wrap: wrap; /* Allow wrapping on smaller screens */
	gap: 10px;
	align-items: center;
}

.rewards-level-row .setting-item-control input[type="text"] {
	flex: 1;
	min-width: 100px; /* Ensure reasonable minimum width */
}

.rewards-item-row .setting-item-control .input-container {
	/* Obsidian uses this class for text/textarea */
	flex: 1;
	min-width: 150px;
}

.rewards-item-row .setting-item-control textarea {
	width: 100%; /* Make textarea take full width within its container */
	min-height: 40px; /* Ensure it's tall enough for a couple lines */
	resize: vertical;
}

.rewards-item-row .setting-item-control .dropdown {
	min-width: 120px;
}

.rewards-level-row .setting-item-control button,
.rewards-item-row .setting-item-control button {
	margin-left: auto; /* Push delete button to the right */
}

.rewards-item-divider {
	border: none;
	height: 1px;
	background-color: var(--background-modifier-border);
	margin-top: 15px;
	margin-bottom: 15px;
}

/* END: Reward Settings Styles */

/* START: Task Handler Settings Styles */
.setting-item.sort-criterion-row .setting-item-info {
	display: none;
}

.setting-item.sort-criterion-row select.dropdown {
	flex: 1;
}

/* END: Task Handler Settings Styles */

/* START: View Management Styles */
.view-management-list {
	margin: 10px 0;
	border: 1px solid var(--background-modifier-border);
	border-radius: 5px;
	padding: 10px;
}

.view-edit-button,
.view-copy-button,
.view-order-button,
.view-delete-button {
	padding: 4px;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	margin-left: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.view-copy-button {
	color: var(--interactive-accent);
}

.view-copy-button:hover {
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
}

.view-delete-button {
	color: var(--text-error);
}

.view-delete-button:hover {
	background-color: var(--background-modifier-error);
	color: var(--text-on-accent);
}

.view-icon {
	margin-right: 8px;
	--icon-size: 16px;
}

/* Copy mode info styles */
.copy-mode-info {
	margin: 10px 0;
	padding: 12px;
	background-color: var(--background-secondary-alt);
	border-radius: 5px;
	border-left: 3px solid var(--interactive-accent);
}

.copy-mode-info p {
	margin: 4px 0;
}

/* END: View Management Styles */

/* Tasks Plugin Compatibility Warning Banner */
.tasks-compatibility-warning {
	display: flex;
	align-items: flex-start;
	gap: var(--size-4-3);
	padding: var(--size-4-4);
	margin-bottom: var(--size-4-4);
	background-color: hsl(
		var(--accent-h),
		var(--accent-s),
		var(--accent-l),
		0.5
	);
	border: 1px solid
		hsl(var(--accent-h), var(--accent-s), var(--accent-l), 0.5);
	border-radius: var(--radius-m);
	color: var(--text-on-accent);
}

.tasks-warning-icon {
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
}

.tasks-warning-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--size-2-2);
}

.tasks-warning-title {
	font-weight: 600;
	font-size: var(--font-ui-medium);
}

.tasks-warning-text {
	color: var(--text-on-accent);
	font-size: var(--font-ui-small);
	line-height: 1.4;
}

.tasks-warning-text a {
	color: var(--text-on-accent);
	text-decoration: underline;
}

.tasks-warning-text a:hover {
	color: var(--text-on-accent);
}

.task-genius-format-examples {
	display: flex;
	flex-direction: column;
	gap: var(--size-2-3);
	padding: var(--size-4-3);
	margin: var(--size-4-3) 0;
	border-radius: var(--radius-m);
	background-color: var(--background-secondary-alt);
	border: 1px solid var(--background-modifier-border);
}

.task-genius-format-examples strong {
	font-size: var(--font-ui-medium);
	font-weight: 600;
	color: var(--text-normal);
	margin-bottom: var(--size-2-1);
}

.task-genius-format-examples span {
	font-family: var(--font-monospace);
	font-size: var(--font-ui-smaller);
	line-height: 1.5;
	color: var(--text-muted);
	padding: var(--size-2-1) var(--size-2-3);
	background-color: var(--background-primary);
	border-radius: var(--radius-s);
	border: 1px solid var(--background-modifier-border);
	margin: var(--size-2-1) 0;
}

.task-genius-format-examples span:first-of-type {
	margin-top: 0;
}

.task-genius-format-examples span:last-of-type {
	margin-bottom: 0;
}

/* Enhanced Project Configuration Styles */
.project-path-mappings-container,
.project-metadata-mappings-container {
	margin-top: 10px;
}

.project-path-mapping-row,
.project-metadata-mapping-row {
	border: 1px solid var(--background-modifier-border);
	border-radius: 6px;
	margin-bottom: 10px;
	padding: 10px;
}

.no-mappings-message {
	color: var(--text-muted);
	font-style: italic;
	text-align: center;
	padding: 20px;
}

/* Task Project Display Styles */
.task-project-tg {
	opacity: 0.8;
	font-style: italic;
	border-left: 2px solid var(--color-accent);
	padding-left: 4px;
}

.task-project-tg::before {
	content: "🔗";
	margin-right: 2px;
	font-size: 0.8em;
}

/* Metadata Editor Project Styles */
.project-readonly {
	opacity: 0.8;
}

.project-readonly input {
	background-color: var(--background-modifier-border);
	cursor: not-allowed;
}

.project-source-indicator {
	font-size: var(--font-ui-smaller);
	color: var(--text-muted);
	font-style: italic;
	margin-top: 4px;
}
